package ru.spb.osll.myfit.server;

import static org.junit.Assert.assertEquals;

import java.util.TreeMap;

import org.junit.Test;

public class FixtureNameComparatorTest {

	@Test
	public void testCompare() {
		TreeMap<String, String> fixtureMap = new TreeMap<String, String>(
				new FixtureNameComparator());

		fixtureMap.put("Div", "Div");
		fixtureMap.put("Sub", "Sub");
		fixtureMap.put("Mul", "Mul");
		fixtureMap.put("Sum", "Sum");
		fixtureMap.put("My fixture", "MyFixture");
		fixtureMap.put("Do Something", "DoSomething");
		fixtureMap.put("another fixture", "AnotherFixture");
		fixtureMap.put("Start writing with cubetools fixture",
				"StartWritingWithCubetoolsFixture");
		fixtureMap.put("Writing with cubetools fixture",
				"WritingWithCubetoolsFixture");
		fixtureMap.put("Verify read clips back with cubetools using fixture",
				"VerifyReadClipsBackWithCubetoolsUsingFixture");

		assertEquals("Div", fixtureMap.get("div"));
		assertEquals("Sub", fixtureMap.get("sub"));
		assertEquals("Mul", fixtureMap.get("mul"));
		assertEquals("Sum", fixtureMap.get("sum"));
		assertEquals("MyFixture", fixtureMap.get("my fixture"));
		assertEquals("DoSomething", fixtureMap.get("do something"));
		assertEquals("AnotherFixture", fixtureMap.get("another fixture"));
		assertEquals("MyFixture", fixtureMap.get("my"));
		assertEquals("DoSomething", fixtureMap.get("do something fixture"));
		assertEquals("StartWritingWithCubetoolsFixture", fixtureMap
				.get("start writing with cubetools fixture"));
		assertEquals("WritingWithCubetoolsFixture", fixtureMap
				.get("writing with cubetools"));
		assertEquals("VerifyReadClipsBackWithCubetoolsUsingFixture", fixtureMap
				.get("verify read clips back with cubetools using"));
	}
}
